%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% This file is part of the book
%%
%% Algorithmic Graph Theory
%% http://code.google.com/p/graph-theory-algorithms-book/
%%
%% Copyright (C) 2009--2011 Minh Van Nguyen <nguyenminh2@gmail.com>
%%
%% See the file COPYING for copying conditions.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DontPrintSemicolon
\SetAlgoNoLine
%%
%% data section
\SetKwData{MyMin}{min}
\SetKwData{NULL}{\footnotesize{NULL}}
%%
%% input
\KwIn{A binomial heap $H$ of order $n > 0$.}
%%
%% output
\KwOut{The minimum vertex of $H$.}
\BlankLine
%%
%% algorithm body
$u \assign \NULL$\;
$v \assign \headElem[H]$\;
$\MyMin \assign \infty$\;
\While{$v \neq \NULL$}{
  \If{$\kappa_v < \MyMin$}{
    $\MyMin \assign \kappa_v$\;
    $u \assign v$\;
  }
  $v \assign \sibling[v]$\;
}
\Return $u$\;
